package com.smiier.skin.net;

import java.util.ArrayList;

import android.content.Context;
import cn.o.app.json.JSONField;
import cn.o.app.json.JsonDate;
import cn.o.app.net.NetTask;

import com.smiier.skin.constant.Constant;
import com.smiier.skin.net.AccountGetListTask.AccountGetListRequest;
import com.smiier.skin.net.AccountGetListTask.AccountGetListResponse;
import com.smiier.skin.util.GlobalSettings;

/**
 * 获取账单明细 充值记录 提现记录
 * 
 * @author 杨文华
 * 
 */
public class AccountGetListTask extends
		NetTask<AccountGetListRequest, AccountGetListResponse> {

	public static class AccountGetListRequest extends ORequest {

		public String token;
		public String startid;
		public int pagesize;
		public String appname = Constant.APP_NAME;
		// type=账单类型 0充值 1提现 2消费 3获得诊金
		public Integer type;
	}

	public static class AccountGetListResponse extends OResponse {
		public AccountListRes Res;
	}

	public static class AccountListRes {
		public int Count;
		public ArrayList<AccountListItem> AccountList;
	}

	public static class AccountListItem {
		public String id;
		public long Uid;
		public long Qid;
		public long AADID;
		public long ARID;
		public String Pay_Platform;
		public String Pay_Orderid;
		public String Card;
		public String Bank;
		public String Name;
		public double Cost;

		@JSONField(format = "yyyy-MM-dd HH:mm:ss")
		public JsonDate CreateTime;

		public int Status;
		public int Type;
	}

	@Override
	public void setContext(Context context) {
		super.setContext(context);
		mUrl = GlobalSettings.SERVER_URL + GlobalSettings.SERVER_URL_JOIN
				+ "?api=Account.GetList";
		mRequestMethod = METHOD_GET;
	}

}
